package com.shop.domain.system;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.*;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;

/**
 * <p>SystemGroupData 实体类</p>
 * <p>Table: t_system_group_data - 组合数据详情表</p>
 * @author generator
 * @date 2021-03-04 08:39:48
 */
@ApiModel("SystemGroupData 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_system_group_data")
@SQLDelete(sql = "update t_system_group_data set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class SystemGroupData extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 对应的数据组id
	 */
    @ApiModelProperty("对应的数据组id")
	@Column(name = "gid")
    private Integer gid;

    /**
	 * 数据组对应的数据值（json数据）
	 */
    @ApiModelProperty("数据组对应的数据值（json数据）")
	@Column(name = "value")
    private String value;

    /**
	 * 数据排序
	 */
    @ApiModelProperty("数据排序")
	@Column(name = "sort")
    private Integer sort;

    /**
	 * 状态（1：开启；2：关闭；）
	 */
    @ApiModelProperty("状态（1：开启；2：关闭；）")
	@Column(name = "status")
    private Integer status;

    /**
	 * 创建时间
	 */
    @ApiModelProperty("创建时间")
	@Column(name = "create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
	 * 修改时间
	 */
    @ApiModelProperty("修改时间")
	@Column(name = "update_time")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
	 * 是否删除
	 */
    @ApiModelProperty("是否删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}